package Service;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;


//use to format date
public class DateFormatter {

	public static final String DATE_FORMAT="yyyy-MM-dd HH:mm:ss";
	private static SimpleDateFormat format=new SimpleDateFormat(DATE_FORMAT);
	
	public static String format(Date date){
		return format.format(date);
	}
	
	public static Date parse(String datestr)throws ParseException {
		return format.parse(datestr);
	}
	
}